package com.itcast.article.dao;


import com.itcast.article.po.Comment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

/**
 * dao层
 */
public interface CommentRepository extends MongoRepository<Comment,String > {


    /**
     * 条件查询   findBy固定格式，parentid是要查询的字段名字
     * @param parentid
     * @param pageable
     * @return
     */
    Page<Comment> findByParentid(String parentid, Pageable pageable);

}
